load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "config.go",
        "job.go",
        "migration.go",
        "pod_servers.go",
        "test.go",
        "utils.go",
        "vmi_servers.go",
    ],
    importpath = "kubevirt.io/kubevirt/tests",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/certificates/bootstrap:go_default_library",
        "//pkg/certificates/triple/cert:go_default_library",
        "//pkg/controller:go_default_library",
        "//pkg/util/cluster:go_default_library",
        "//pkg/util/net/ip:go_default_library",
        "//pkg/virt-config:go_default_library",
        "//pkg/virt-controller/services:go_default_library",
        "//pkg/virt-launcher/virtwrap/api:go_default_library",
        "//pkg/virt-operator/creation/components:go_default_library",
        "//pkg/virt-operator/util:go_default_library",
        "//pkg/virtctl:go_default_library",
        "//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
        "//staging/src/kubevirt.io/client-go/log:go_default_library",
        "//tests/console:go_default_library",
        "//tests/containerdisk:go_default_library",
        "//tests/flags:go_default_library",
        "//tests/framework/cleanup:go_default_library",
        "//tests/libnet:go_default_library",
        "//tests/libvmi:go_default_library",
        "//tools/vms-generator/utils:go_default_library",
        "//vendor/github.com/Masterminds/semver:go_default_library",
        "//vendor/github.com/google/go-github/v32/github:go_default_library",
        "//vendor/github.com/google/goexpect:go_default_library",
        "//vendor/github.com/mfranczy/crd-rest-coverage/pkg/report:go_default_library",
        "//vendor/github.com/onsi/ginkgo:go_default_library",
        "//vendor/github.com/onsi/ginkgo/config:go_default_library",
        "//vendor/github.com/onsi/gomega:go_default_library",
        "//vendor/github.com/spf13/cobra:go_default_library",
        "//vendor/golang.org/x/crypto/ssh:go_default_library",
        "//vendor/k8s.io/api/autoscaling/v1:go_default_library",
        "//vendor/k8s.io/api/batch/v1:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/api/rbac/v1:go_default_library",
        "//vendor/k8s.io/api/storage/v1:go_default_library",
        "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/meta:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/yaml:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
        "//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library",
        "//vendor/k8s.io/client-go/tools/portforward:go_default_library",
        "//vendor/k8s.io/client-go/tools/remotecommand:go_default_library",
        "//vendor/k8s.io/client-go/transport/spdy:go_default_library",
        "//vendor/k8s.io/utils/net:go_default_library",
        "//vendor/kubevirt.io/containerized-data-importer/pkg/apis/core/v1alpha1:go_default_library",
    ],
)

load(
    "@io_bazel_rules_docker//container:container.bzl",
    "container_image",
)

container_image(
    name = "conformance_image_base",
    testonly = True,
    architecture = select({
        "@io_bazel_rules_go//go/platform:linux_ppc64le": "ppc64le",
        "//conditions:default": "amd64",
    }),
    base = select({
        "@io_bazel_rules_go//go/platform:linux_ppc64le": "@fedora_ppc64le//image",
        "//conditions:default": "@fedora//image",
    }),
    directory = "/",
    files = [
        ":conformance-config.json",
    ],
    visibility = ["//visibility:public"],
)

container_image(
    name = "conformance_image",
    testonly = True,
    base = ":conformance_image_base",
    directory = "/usr/bin",
    entrypoint = ["/usr/bin/conformance"],
    files = [
        ":go_default_test",
        "//tests/conformance",
    ],
    visibility = ["//visibility:public"],
)

go_test(
    name = "go_default_test",
    srcs = [
        "access_test.go",
        "config_test.go",
        "console_test.go",
        "container_disk_test.go",
        "credentials_test.go",
        "datavolume_test.go",
        "expose_test.go",
        "imageupload_test.go",
        "infra_test.go",
        "kubectl_test.go",
        "kubevirt_configmap_test.go",
        "migration_test.go",
        "networkpolicy_test.go",
        "operator_test.go",
        "pausing_test.go",
        "probes_test.go",
        "replicaset_test.go",
        "restore_test.go",
        "security_features_test.go",
        "snapshot_test.go",
        "stability_test.go",
        "storage_test.go",
        "subresource_api_test.go",
        "template_test.go",
        "tests_suite_test.go",
        "version_test.go",
        "virt_control_plane_test.go",
        "vm_test.go",
        "vm_watch_test.go",
        "vmi_cloudinit_hook_sidecar_test.go",
        "vmi_cloudinit_test.go",
        "vmi_configuration_test.go",
        "vmi_controller_test.go",
        "vmi_gpu_test.go",
        "vmi_headless_test.go",
        "vmi_hook_sidecar_test.go",
        "vmi_hostdev_test.go",
        "vmi_ignition_test.go",
        "vmi_iothreads_test.go",
        "vmi_lifecycle_test.go",
        "vmi_monitoring_test.go",
        "vmi_multiqueue_test.go",
        "vmi_multus_test.go",
        "vmi_networking_test.go",
        "vmi_slirp_interface_test.go",
        "vmidefaults_test.go",
        "vmipreset_test.go",
        "vnc_test.go",
        "windows_test.go",
    ],
    embed = [":go_default_library"],
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/certificates/triple:go_default_library",
        "//pkg/certificates/triple/cert:go_default_library",
        "//pkg/cloud-init:go_default_library",
        "//pkg/config:go_default_library",
        "//pkg/controller:go_default_library",
        "//pkg/hooks:go_default_library",
        "//pkg/hooks/v1alpha1:go_default_library",
        "//pkg/hooks/v1alpha2:go_default_library",
        "//pkg/host-disk:go_default_library",
        "//pkg/testutils:go_default_library",
        "//pkg/util/cluster:go_default_library",
        "//pkg/util/hardware:go_default_library",
        "//pkg/util/migrations:go_default_library",
        "//pkg/util/net/dns:go_default_library",
        "//pkg/virt-config:go_default_library",
        "//pkg/virt-controller/leaderelectionconfig:go_default_library",
        "//pkg/virt-controller/services:go_default_library",
        "//pkg/virt-controller/watch:go_default_library",
        "//pkg/virt-handler/device-manager:go_default_library",
        "//pkg/virt-launcher/virtwrap/api:go_default_library",
        "//pkg/virt-launcher/virtwrap/converter:go_default_library",
        "//pkg/virt-operator/creation/components:go_default_library",
        "//pkg/virt-operator/util:go_default_library",
        "//pkg/virtctl/expose:go_default_library",
        "//pkg/virtctl/vm:go_default_library",
        "//staging/src/kubevirt.io/client-go/api/v1:go_default_library",
        "//staging/src/kubevirt.io/client-go/apis/snapshot/v1alpha1:go_default_library",
        "//staging/src/kubevirt.io/client-go/kubecli:go_default_library",
        "//staging/src/kubevirt.io/client-go/log:go_default_library",
        "//staging/src/kubevirt.io/client-go/subresources:go_default_library",
        "//tests/assert:go_default_library",
        "//tests/console:go_default_library",
        "//tests/containerdisk:go_default_library",
        "//tests/flags:go_default_library",
        "//tests/framework/matcher:go_default_library",
        "//tests/framework/storage:go_default_library",
        "//tests/libnet:go_default_library",
        "//tests/libvmi:go_default_library",
        "//tests/network:go_default_library",
        "//tests/reporter:go_default_library",
        "//tests/storage:go_default_library",
        "//tools/vms-generator/utils:go_default_library",
        "//vendor/github.com/evanphx/json-patch:go_default_library",
        "//vendor/github.com/google/goexpect:go_default_library",
        "//vendor/github.com/gorilla/websocket:go_default_library",
        "//vendor/github.com/kubernetes-csi/external-snapshotter/v2/pkg/apis/volumesnapshot/v1beta1:go_default_library",
        "//vendor/github.com/mitchellh/go-vnc:go_default_library",
        "//vendor/github.com/onsi/ginkgo:go_default_library",
        "//vendor/github.com/onsi/ginkgo/config:go_default_library",
        "//vendor/github.com/onsi/ginkgo/extensions/table:go_default_library",
        "//vendor/github.com/onsi/ginkgo/reporters:go_default_library",
        "//vendor/github.com/onsi/gomega:go_default_library",
        "//vendor/github.com/onsi/gomega/gstruct:go_default_library",
        "//vendor/github.com/onsi/gomega/types:go_default_library",
        "//vendor/github.com/pborman/uuid:go_default_library",
        "//vendor/k8s.io/api/admissionregistration/v1beta1:go_default_library",
        "//vendor/k8s.io/api/apps/v1:go_default_library",
        "//vendor/k8s.io/api/authorization/v1:go_default_library",
        "//vendor/k8s.io/api/autoscaling/v1:go_default_library",
        "//vendor/k8s.io/api/batch/v1:go_default_library",
        "//vendor/k8s.io/api/core/v1:go_default_library",
        "//vendor/k8s.io/api/networking/v1:go_default_library",
        "//vendor/k8s.io/api/policy/v1beta1:go_default_library",
        "//vendor/k8s.io/api/rbac/v1:go_default_library",
        "//vendor/k8s.io/api/storage/v1:go_default_library",
        "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1:go_default_library",
        "//vendor/k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1beta1:go_default_library",
        "//vendor/k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/equality:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/api/resource:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/fields:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/intstr:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/json:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/rand:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/strategicpatch:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
        "//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
        "//vendor/k8s.io/client-go/kubernetes/typed/authorization/v1:go_default_library",
        "//vendor/k8s.io/client-go/rest:go_default_library",
        "//vendor/k8s.io/client-go/tools/leaderelection/resourcelock:go_default_library",
        "//vendor/k8s.io/client-go/util/retry:go_default_library",
        "//vendor/k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset:go_default_library",
        "//vendor/k8s.io/utils/net:go_default_library",
        "//vendor/k8s.io/utils/pointer:go_default_library",
        "//vendor/kubevirt.io/containerized-data-importer/pkg/apis/core/v1alpha1:go_default_library",
        "//vendor/kubevirt.io/containerized-data-importer/pkg/apis/core/v1beta1:go_default_library",
        "//vendor/kubevirt.io/controller-lifecycle-operator-sdk/pkg/sdk/api:go_default_library",
        "//vendor/kubevirt.io/qe-tools/pkg/ginkgo-reporters:go_default_library",
    ],
)
